package com.ruoyi.hatha.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hatha.mapper.PFenleiMapper;
import com.ruoyi.hatha.domain.PFenlei;
import com.ruoyi.hatha.service.IPFenleiService;

/**
 * 课程分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-15
 */
@Service
public class PFenleiServiceImpl implements IPFenleiService 
{
    @Autowired
    private PFenleiMapper pFenleiMapper;

    /**
     * 查询课程分类
     * 
     * @param id 课程分类主键
     * @return 课程分类
     */
    @Override
    public PFenlei selectPFenleiById(Long id)
    {
        return pFenleiMapper.selectPFenleiById(id);
    }

    /**
     * 查询课程分类列表
     * 
     * @param pFenlei 课程分类
     * @return 课程分类
     */
    @Override
    public List<PFenlei> selectPFenleiList(PFenlei pFenlei)
    {
        return pFenleiMapper.selectPFenleiList(pFenlei);
    }

    /**
     * 新增课程分类
     * 
     * @param pFenlei 课程分类
     * @return 结果
     */
    @Override
    public int insertPFenlei(PFenlei pFenlei)
    {
        return pFenleiMapper.insertPFenlei(pFenlei);
    }

    /**
     * 修改课程分类
     * 
     * @param pFenlei 课程分类
     * @return 结果
     */
    @Override
    public int updatePFenlei(PFenlei pFenlei)
    {
        return pFenleiMapper.updatePFenlei(pFenlei);
    }

    /**
     * 批量删除课程分类
     * 
     * @param ids 需要删除的课程分类主键
     * @return 结果
     */
    @Override
    public int deletePFenleiByIds(Long[] ids)
    {
        return pFenleiMapper.deletePFenleiByIds(ids);
    }

    /**
     * 删除课程分类信息
     * 
     * @param id 课程分类主键
     * @return 结果
     */
    @Override
    public int deletePFenleiById(Long id)
    {
        return pFenleiMapper.deletePFenleiById(id);
    }
}
